using System.Collections;

namespace SQLServices.Repository
{
	public interface ISQLConnection
	{
		bool LoginSecure { get; }
		string ServerName { get; }
		string UserId { get; }
		string Password { get; }
		int VersionMajor { get; }

        /// <summary>
        /// Opens a connection to the server with the passed parameters
        /// </summary>
		void OpenConnection(string serverName, string userId, string password, bool trusted);

        /// <summary>
        /// Creates a new instance of ISQLDBConn if there is not database connection or if the current
        /// database is different to the passed database name
        /// </summary>
		ISQLDBConn GetDatabase(string databaseName);

        /// <summary>
        /// Gets the current database connection
        /// </summary>
        /// <returns></returns>
		ISQLDBConn GetDatabase();

        /// <summary>
        /// It calles the Disconnect method and creates a new connection to the server
        /// </summary>
		void Reset();

        /// <summary>
        /// Disconnects and close the current connection to the server
        /// </summary>
		void Disconnect();

        /// <summary>
        /// Returns the list of available database for the current server
        /// </summary>
		ArrayList ListOfDatabases();
	}
}